<template>
   <div class="search">
      <div class="search_info">
        <div class="search_info_left">
          <p @click="$router.push('/citylist')">{{city}}<van-icon name="play" /></p>
          <span>|</span>
          <van-icon name="search" />
          <input type="text" placeholder="请输入小区或地址" />
        </div>
        <van-icon name="map-marked" @click="$router.push('/hourmap')"/>
      </div>
    </div>
</template>

<script>
export default {
  name: 'MySearch',
  props: ['city']
}
</script>

<style lang="less" scoped>
  .search {
    position: fixed;
    top: 20px;
    z-index: 1;
    width: 100%;
    .search_info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 30px;
      .search_info_left {
        width: 80%;
        margin-left: 20px;
        background-color: #fff;
        display: flex;
        align-items: center;
        border-radius: 4px;
        input {
          flex: 1;
          border: 0;
          color: black;
          font-size: 12px;
          padding:0 10px;
          &::placeholder {
            color: #ccc;
          }
        }
        p {
          width: 50px;
          line-height: 30px;
          font-size: 14px;
          padding-left: 6px;
          .van-icon-play {
            transform: rotate(90deg);
            color: #7f7f80;
            font-size: 12px;
          }
        }
        span{
          width: 1px;
          color: #787d82;
        }
        .van-icon-search{
          font-size: 14px;
          padding-left: 10px;
        }
      }
      .van-icon-map-marked{
        color: #fff;
        font-size: 24px;
        margin-right: 16px;
      }
    }
  }
</style>
